import server from "./server";

export const query = {
  pageSize: 10,
  pageNum: 1,
};

export function getVolList() {
  return server({
    url: "/volunteer/findAll",
    params: {
      pageSize: query.pageSize,
      pageNum: query.pageNum,
    },
  });
}


export function getSearchVol(name:string){
  return server({
    url:'/volunteer/findAll?v_name='+ name
  })
}

export function getDetailVol(id:number){
  return server({
    url: "/volunteer/findOne/"+id,
  })
}


export function getDeleteVol(id:number){
  return server({
    method: "POST",
    url: "/volunteer/del/"+id,
  })
}


export function getAllVoluns() {
  return server({
    url: "/volunteer/getAll",
  });
}